package SortAlgorithm;

import java.util.Arrays;

import static SortAlgorithm.SelectSort.swap;

public class BubbleSort {
    public static void main(String[] args) {
        int[] a=new int[]{92 ,31 ,51 ,88 ,87 ,71 ,43, 3 ,96 ,5};
        System.out.println(Arrays.toString(a));
        bubbleSort(a);
        System.out.println(Arrays.toString(a));
    }
    public static void bubbleSort(int[] array){
        for(int i=0;i<array.length;i++){
            for(int j=0;j<array.length-i-1;j++){
                if(array[j]>array[j+1]){
                    swap(array,j,j+1);
                }
            }
        }
    }
}
